const Service = require('egg').Service

class LoginService extends Service {

    async find(query) {
        const userInfo = await this.ctx.model.Users.findOne({
            where: { 
                'email': query.email ,
                'password': this.ctx.helper.password_to_crypto(query.password)
            }
        })

        return userInfo
    }
}

module.exports = LoginService